﻿$(function (){
    loadEchart();
})

var cxt = "/powerview/";

var timenum = $('#selectTime').val();

//selectTime  //点击事件
function selectTime(){
	timenum = $('#selectTime').val();
	clearInterval(interval);  //停止原有的时间定时器
	setInterval(refresh,timenum);  //重新开启时间定时器
}
selectTime()
function loadEchart(){
    //电网稳定曲线法		----数据yes
    loadDWwwdqx();		
    //六大区电力负荷		----数据yes
    loadLddqdlfh();
    //电力频率全国分布情况
    loadDlplqgfbqk();
    //仪表盘				----数据yes
    loadYbp();
    //中国地图
    loadZgdt();
    //关键节点稳定指标			----数据yes
    loadGjjdwdzb();
    //策略表			----数据yes
     loadClb();
    //敲淮南等值参数   ----数据yes
     loadQhndzcs();
}

//电网稳定曲线
function loadDWwwdqx(){
    var echart = echarts.init(document.getElementById("dwwdqx"));
    var legendData = ["用电负荷(W)","供电负荷(W)","频率(HZ)"];
    var xAxisData = ["24", "2", "4", "6","8", "10", "12", "14", "16", "18","20", "22（时）"];
    var data1=[]
	var data2=[]
	var data3=[]
    $.ajax({
        type: "POST",
        dataType: "JSON",
        async:  false,
        url: cxt+"power/selectDWwwdqx",
        contentType: "application/json;charset=UTF-8",
        success: function(r){
            if(r!=null){
            	for(var i=0;i<r.length;i++){
            		data1.push(r[i].map.electricityload);
            		data2.push(r[i].map.psupplyload);
            		data3.push(r[i].map.frequency);
            	}
            	console.log(r)
            	//数据转换
            }
        },
        error: function(r){
        }
    })
    var option = {
        "color": ["#205FB8", "#A85B60", "#699A66"],
        "grid": {
            "top": 60,
            "bottom": 20,
            "left": 20,
            "right": 20,
            "containLabel": true
        },
        "legend": {
            "data": legendData,
            "top": 20,
            "textStyle":{
                "color":"FFFfff"
            }
        },
        "tooltip": {
            "trigger": "item",
            "axisPointer": {
                "type": "cross",
                "crossStyle": {
                    "color": "#999"
                }
            },
        },
        "xAxis": [{
            "type": "category",
            "axisLine": {
                "show": false
            },
            "axisTick": false,
            "splitLine": {
                "show": false,
            },
            "axisLabel": {
                "color": "#FFFFFF"
            },
            "data": xAxisData
        }],
        "yAxis": [{
            "type": "value",
            "nameTextStyle": {
                "show": false
            },
            "axisTick": false,

            "axisLine": {
                "show": false
            },
            "splitLine": {
                "show": false,
            },
            "inside": true,
            "max": 1000,
            "axisLabel": {
                "color": "#FFFFFF",
            }
        }, {
            "type": "value",
            "nameTextStyle": {
                "show": false
            },
            "axisTick": false,
            "axisLine": {
                "show": false
            },
            "splitLine": {
                "show": false,
            },
            "inside": true,
            "max": 100,
            "axisLabel": {
                "color": "#FFFFFF",
            }
        }],
        "series": [{
            "name": legendData[0],
            "type": "line",
            "data": data1,

        }, {
            "name": legendData[1],
            "type": "line",
            "data": data2,
        }, {
            "name": legendData[2],
            "type": "line",
            "yAxisIndex": 1,
            "areaStyle": {
                "normal": {
                    "opacity": 0.3
                }
            },
            "data": data3 ,
        }]
    }
    echart.setOption(option);
    echart.hideLoading();
    //自动适应屏幕浏览器的大小 当浏览器大小改变时 报表画布也跟着改变
    window.onresize = function () {
        echart.resize();
    };
}

//六大区电力负荷
function loadLddqdlfh(){
	
    var echart = echarts.init(document.getElementById("ldqdlfh"));
    var legendData = ['华北电网', '东北电网','华东电网','华中电网','西北电网','西南电网'];
    var data1=[]
    var data2=[]
    var data3=[]
    var data4=[]
    var data5=[]
    var data6=[]
    var data7=[]
    var data8=[]
    var data9=[]
    var data10=[]
    var data11=[]
    var data12=[]
    var index1  = 0;
    var index2  = 0;
    $.ajax({
        type: "POST",
        dataType: "JSON",
        async:  false,
        url: cxt+"power/selectLddqdlfh",
        contentType: "application/json;charset=UTF-8",
        success: function(r){
            if(r!=null){
            	//数据转换
            	for(var i=0;i<r.length;i++){
            		//用电负荷
            		if(r[i].map.elnorthchinaval!=null){
            			data1.push(r[i].map.elnorthchinaval);//华北安全值
                		data2.push(r[i].map.elnortheastval);//东北安全值
                		data3.push(r[i].map.eleastchinaval);//华东安全值
                		data4.push(r[i].map.elcentralchinaval);//华中安全值
                		data5.push(r[i].map.elnorthwestval);//西北安全值
                		data6.push(r[i].map.elsouthwestval);//西南安全值
            		}
            		if(r[i].map.psnorthchinaval!=null){
            			//供电负荷
                		data7.push(r[i].map.psnorthchinaval);//华北安全值
                		data8.push(r[i].map.pselnortheastval);//东北安全值
                		data9.push(r[i].map.pseleastchinaval);//华东安全值
                		data10.push(r[i].map.pselcentralchinaval);//华中安全值
                		data11.push(r[i].map.pselnorthwestval);//西北安全值
                		data12.push(r[i].map.pselsouthwestval);//西南安全值
            		}
            	}
            	var len1=data1.length;
            	var len2=data7.length;
            	len1=parseInt(len1*Math.random())
            	len2=parseInt(len2*Math.random())
            	index1 = len1;
            	index2 = len2;
            }
        },
        error: function(r){
        }
    })
    var option = {
        color: [
            '#9bc948',
            '#5b76a2',
            '#5999b4',
            '#4e559e',
            '#5999b3',
            '#6ec095',
        ],
        legend: {
            orient: 'vertical',
            x:'right',
            y:'top',
            left: '70%',
            data: legendData,
            top: '15%',
            textStyle: {
                color: ['#FFFFFF']
            }
        },
        tooltip: {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        title: [{
            left: '49%',
            top: '45%',
            textAlign: 'center',
            text: '供电负荷',
            textStyle: {
                fontSize: 14,
                color: '#FFFFFF'
            },
        }, {
            left: '19%',
            top: '45%',
            textAlign: 'center',
            text: '用电负荷',
            textStyle: {
                fontSize: 14,
                color: '#FFFFFF'
            }
        }, {
            text: '六大区电力负荷值',
            left: 'center',
            top: '2%',
            textStyle: {
                fontSize: 15,
                color: '#48adbe'
            }
        }],
        series: [
            {
                name: '六大区电力负荷',
                type: 'pie',
                radius: ['35%', '55%'],
                center: ['50%', '50%'],
                itemStyle : {
                    normal : {
                        label : {
                            show : false
                        },
                        labelLine : {
                            show : false
                        }
                    },

                },
                data: [
                    {
                        value: data1[index1],
                        name: legendData[0]
                    },
                    {
                        value: data2[index1],
                        name: legendData[1]
                    },
                    {
                        value: data3[index1],
                        name: legendData[2]
                    },
                    {
                        value: data4[index1],
                        name: legendData[3]
                    },
                    {
                        value: data5[index1],
                        name: legendData[4]
                    },
                    {
                        value: data6[index1],
                        name: legendData[5]
                    }
                ],
            },
            {
                name: '六大区电力负荷',
                type: 'pie',
                radius: ['35%', '55%'],
                center: ['20%', '50%'],
                itemStyle : {
                    normal : {
                        label : {
                            show : false
                        },
                        labelLine : {
                            show : false
                        }
                    },

                },
                data: [
                    {
                        value: data7[index2],
                        name: legendData[0]
                    },
                    {
                        value: data8[index2],
                        name: legendData[1]
                    },
                    {
                        value: data9[index2],
                        name: legendData[2]
                    },
                    {
                        value: data10[index2],
                        name: legendData[3]
                    },
                    {
                        value: data11[index2],
                        name: legendData[4]
                    },
                    {
                        value: data12[index2],
                        name: legendData[5]
                    }
                ],
            }

        ]
    };
    echart.setOption(option);
    echart.hideLoading();
    //自动适应屏幕浏览器的大小 当浏览器大小改变时 报表画布也跟着改变
    window.onresize = function () {
        echart.resize();
    };
}

//电力频率全国分布情况
function loadDlplqgfbqk(){
    var echart = echarts.init(document.getElementById("dlplqgfbqk"));
    var geoCoordMap = {
        "海门":[121.15,31.89],
        "鄂尔多斯":[109.781327,39.608266],
        "招远":[120.38,37.35],
        "舟山":[122.207216,29.985295],
        "齐齐哈尔":[123.97,47.33],
        "盐城":[120.13,33.38],
        "赤峰":[118.87,42.28],
        "青岛":[120.33,36.07],
        "乳山":[121.52,36.89],
        "金昌":[102.188043,38.520089],
        "泉州":[118.58,24.93],
        "莱西":[120.53,36.86],
        "日照":[119.46,35.42],
        "胶南":[119.97,35.88],
        "南通":[121.05,32.08],
        "拉萨":[91.11,29.97],
        "云浮":[112.02,22.93],
        "梅州":[116.1,24.55],
        "文登":[122.05,37.2],
        "上海":[121.48,31.22],
        "攀枝花":[101.718637,26.582347],
        "威海":[122.1,37.5],
        "承德":[117.93,40.97],
        "厦门":[118.1,24.46],
        "汕尾":[115.375279,22.786211],
        "潮州":[116.63,23.68],
        "丹东":[124.37,40.13],
        "太仓":[121.1,31.45],
        "曲靖":[103.79,25.51],
        "烟台":[121.39,37.52],
        "福州":[119.3,26.08],
        "瓦房店":[121.979603,39.627114],
        "即墨":[120.45,36.38],
        "抚顺":[123.97,41.97],
        "玉溪":[102.52,24.35],
        "张家口":[114.87,40.82],
        "阳泉":[113.57,37.85],
        "莱州":[119.942327,37.177017],
        "湖州":[120.1,30.86],
        "汕头":[116.69,23.39],
        "昆山":[120.95,31.39],
        "宁波":[121.56,29.86],
        "湛江":[110.359377,21.270708],
        "揭阳":[116.35,23.55],
        "荣成":[122.41,37.16],
        "连云港":[119.16,34.59],
        "葫芦岛":[120.836932,40.711052],
        "常熟":[120.74,31.64],
        "东莞":[113.75,23.04],
        "河源":[114.68,23.73],
        "淮安":[119.15,33.5],
        "泰州":[119.9,32.49],
        "南宁":[108.33,22.84],
        "营口":[122.18,40.65],
        "惠州":[114.4,23.09],
        "江阴":[120.26,31.91],
        "蓬莱":[120.75,37.8],
        "韶关":[113.62,24.84],
        "嘉峪关":[98.289152,39.77313],
        "广州":[113.23,23.16],
        "延安":[109.47,36.6],
        "太原":[112.53,37.87],
        "清远":[113.01,23.7],
        "中山":[113.38,22.52],
        "昆明":[102.73,25.04],
        "寿光":[118.73,36.86],
        "盘锦":[122.070714,41.119997],
        "长治":[113.08,36.18],
        "深圳":[114.07,22.62],
        "珠海":[113.52,22.3],
        "宿迁":[118.3,33.96],
        "咸阳":[108.72,34.36],
        "铜川":[109.11,35.09],
        "平度":[119.97,36.77],
        "佛山":[113.11,23.05],
        "海口":[110.35,20.02],
        "江门":[113.06,22.61],
        "章丘":[117.53,36.72],
        "肇庆":[112.44,23.05],
        "大连":[121.62,38.92],
        "临汾":[111.5,36.08],
        "吴江":[120.63,31.16],
        "石嘴山":[106.39,39.04],
        "沈阳":[123.38,41.8],
        "苏州":[120.62,31.32],
        "茂名":[110.88,21.68],
        "嘉兴":[120.76,30.77],
        "长春":[125.35,43.88],
        "胶州":[120.03336,36.264622],
        "银川":[106.27,38.47],
        "张家港":[120.555821,31.875428],
        "三门峡":[111.19,34.76],
        "锦州":[121.15,41.13],
        "南昌":[115.89,28.68],
        "柳州":[109.4,24.33],
        "三亚":[109.511909,18.252847],
        "自贡":[104.778442,29.33903],
        "吉林":[126.57,43.87],
        "阳江":[111.95,21.85],
        "泸州":[105.39,28.91],
        "西宁":[101.74,36.56],
        "宜宾":[104.56,29.77],
        "呼和浩特":[111.65,40.82],
        "成都":[104.06,30.67],
        "大同":[113.3,40.12],
        "镇江":[119.44,32.2],
        "桂林":[110.28,25.29],
        "张家界":[110.479191,29.117096],
        "宜兴":[119.82,31.36],
        "北海":[109.12,21.49],
        "西安":[108.95,34.27],
        "金坛":[119.56,31.74],
        "东营":[118.49,37.46],
        "牡丹江":[129.58,44.6],
        "遵义":[106.9,27.7],
        "绍兴":[120.58,30.01],
        "扬州":[119.42,32.39],
        "常州":[119.95,31.79],
        "潍坊":[119.1,36.62],
        "重庆":[106.54,29.59],
        "台州":[121.420757,28.656386],
        "南京":[118.78,32.04],
        "滨州":[118.03,37.36],
        "贵阳":[106.71,26.57],
        "无锡":[120.29,31.59],
        "本溪":[123.73,41.3],
        "克拉玛依":[84.77,45.59],
        "渭南":[109.5,34.52],
        "马鞍山":[118.48,31.56],
        "宝鸡":[107.15,34.38],
        "焦作":[113.21,35.24],
        "句容":[119.16,31.95],
        "北京":[116.46,39.92],
        "徐州":[117.2,34.26],
        "衡水":[115.72,37.72],
        "包头":[110,40.58],
        "绵阳":[104.73,31.48],
        "乌鲁木齐":[87.68,43.77],
        "枣庄":[117.57,34.86],
        "杭州":[120.19,30.26],
        "淄博":[118.05,36.78],
        "鞍山":[122.85,41.12],
        "溧阳":[119.48,31.43],
        "库尔勒":[86.06,41.68],
        "安阳":[114.35,36.1],
        "开封":[114.35,34.79],
        "济南":[117,36.65],
        "德阳":[104.37,31.13],
        "温州":[120.65,28.01],
        "九江":[115.97,29.71],
        "邯郸":[114.47,36.6],
        "临安":[119.72,30.23],
        "兰州":[103.73,36.03],
        "沧州":[116.83,38.33],
        "临沂":[118.35,35.05],
        "南充":[106.110698,30.837793],
        "天津":[117.2,39.13],
        "富阳":[119.95,30.07],
        "泰安":[117.13,36.18],
        "诸暨":[120.23,29.71],
        "郑州":[113.65,34.76],
        "哈尔滨":[126.63,45.75],
        "聊城":[115.97,36.45],
        "芜湖":[118.38,31.33],
        "唐山":[118.02,39.63],
        "平顶山":[113.29,33.75],
        "邢台":[114.48,37.05],
        "德州":[116.29,37.45],
        "济宁":[116.59,35.38],
        "荆州":[112.239741,30.335165],
        "宜昌":[111.3,30.7],
        "义乌":[120.06,29.32],
        "丽水":[119.92,28.45],
        "洛阳":[112.44,34.7],
        "秦皇岛":[119.57,39.95],
        "株洲":[113.16,27.83],
        "石家庄":[114.48,38.03],
        "莱芜":[117.67,36.19],
        "常德":[111.69,29.05],
        "保定":[115.48,38.85],
        "湘潭":[112.91,27.87],
        "金华":[119.64,29.12],
        "岳阳":[113.09,29.37],
        "长沙":[113,28.21],
        "衢州":[118.88,28.97],
        "廊坊":[116.7,39.53],
        "菏泽":[115.480656,35.23375],
        "合肥":[117.27,31.86],
        "武汉":[114.31,30.52],
        "大庆":[125.03,46.58]
    };

    var convertData = function (data) {
        var res = [];
        for (var i = 0; i < data.length; i++) {
            var geoCoord = geoCoordMap[data[i].name];
            if (geoCoord) {
                res.push(geoCoord.concat(data[i].value));
            }
        }
        return res;
    };
    
//    $.ajax({
//        type: "POST",
//        dataType: "JSON",
//        async:  false,
//        url: cxt+"power/selectDlplqgfbqk",
//        contentType: "application/json;charset=UTF-8",
//        success: function(result){
//            if(result!=null){
//            	//数据转换
//            }
//        },
//        error: function(result){
//        }
//    })
    
    var option = {
        title: {
            text: '电力频率全国分布情况',
            left: 'center',
            top: '2%',
            textStyle: {
                fontSize: 15,
                color: '#48adbe'
            }
        },
        tooltip: {
            trigger: 'item',
            formatter: function(params) {
                return params.seriesName+"<br />"+
                    params.data[0]+"HZ,"+
                    params.data[1]+"HZ,"+
                    params.data[2]+"HZ";
            }
        },
        legend: {
            orient: 'vertical',
            top: 'bottom',
            left: 'right',
            textStyle: {
                color: '#fff'
            }
        },
        visualMap: {
            min: 0,
            max: 300,
            splitNumber: 5,
            show: false,
            color: ['#d94e5d','#eac736','#50a3ba'],
            textStyle: {
                color: '#fff'
            }
        },
        geo: {
            top: '15%',
            map: 'china',
            label: {
                emphasis: {
                    show: false
                }
            },
            itemStyle: {
                normal: {
                    areaColor: '#323c48',
                    borderColor: '#111'
                },
                emphasis: {
                    areaColor: '#2a333d'
                }
            }
        },
        series: [
            {
                name: '西南电力公司',
                type: 'scatter',
                coordinateSystem: 'geo',
                data: convertData([
                    {name: "海门", value: 9},
                    {name: "鄂尔多斯", value: 12},
                    {name: "招远", value: 12},
                    {name: "舟山", value: 12},
                    {name: "齐齐哈尔", value: 14},
                    {name: "盐城", value: 15},
                    {name: "赤峰", value: 16},
                    {name: "青岛", value: 18},
                    {name: "乳山", value: 18},
                    {name: "金昌", value: 19},
                    {name: "泉州", value: 21},
                    {name: "莱西", value: 21},
                    {name: "日照", value: 21},
                    {name: "胶南", value: 22},
                    {name: "南通", value: 23},
                    {name: "拉萨", value: 24},
                    {name: "云浮", value: 24},
                    {name: "梅州", value: 25},
                    {name: "文登", value: 25},
                    {name: "上海", value: 25},
                    {name: "攀枝花", value: 25},
                    {name: "威海", value: 25},
                    {name: "承德", value: 25},
                    {name: "厦门", value: 26},
                    {name: "汕尾", value: 26},
                    {name: "潮州", value: 26},
                    {name: "丹东", value: 27},
                    {name: "太仓", value: 27},
                    {name: "曲靖", value: 27},
                    {name: "烟台", value: 28},
                    {name: "福州", value: 29},
                    {name: "瓦房店", value: 30},
                    {name: "即墨", value: 30},
                    {name: "抚顺", value: 31},
                    {name: "玉溪", value: 31},
                    {name: "张家口", value: 31},
                    {name: "阳泉", value: 31},
                    {name: "莱州", value: 32},
                    {name: "湖州", value: 32},
                    {name: "汕头", value: 32},
                    {name: "昆山", value: 33},
                    {name: "宁波", value: 33},
                    {name: "湛江", value: 33},
                    {name: "揭阳", value: 34},
                    {name: "荣成", value: 34},
                    {name: "连云港", value: 35},
                    {name: "葫芦岛", value: 35},
                    {name: "常熟", value: 36},
                    {name: "东莞", value: 36},
                    {name: "河源", value: 36},
                    {name: "淮安", value: 36},
                    {name: "泰州", value: 36},
                    {name: "南宁", value: 37},
                    {name: "营口", value: 37},
                    {name: "惠州", value: 37},
                    {name: "江阴", value: 37},
                    {name: "蓬莱", value: 37},
                    {name: "韶关", value: 38},
                    {name: "嘉峪关", value: 38},
                    {name: "广州", value: 38},
                    {name: "延安", value: 38},
                    {name: "太原", value: 39},
                    {name: "清远", value: 39},
                    {name: "中山", value: 39},
                    {name: "昆明", value: 39},
                    {name: "寿光", value: 40},
                    {name: "盘锦", value: 40},
                    {name: "长治", value: 41},
                    {name: "深圳", value: 41},
                    {name: "珠海", value: 42},
                    {name: "宿迁", value: 43},
                    {name: "咸阳", value: 43},
                    {name: "铜川", value: 44},
                    {name: "平度", value: 44},
                    {name: "佛山", value: 44},
                    {name: "海口", value: 44},
                    {name: "江门", value: 45},
                    {name: "章丘", value: 45},
                    {name: "肇庆", value: 46},
                    {name: "大连", value: 47},
                    {name: "临汾", value: 47},
                    {name: "吴江", value: 47},
                    {name: "石嘴山", value: 49},
                    {name: "沈阳", value: 50},
                    {name: "苏州", value: 50},
                    {name: "茂名", value: 50},
                    {name: "嘉兴", value: 51},
                    {name: "长春", value: 51},
                    {name: "胶州", value: 52},
                    {name: "银川", value: 52},
                    {name: "张家港", value: 52},
                    {name: "三门峡", value: 53},
                    {name: "锦州", value: 54},
                    {name: "南昌", value: 54},
                    {name: "柳州", value: 54},
                    {name: "三亚", value: 54},
                    {name: "自贡", value: 56},
                    {name: "吉林", value: 56},
                    {name: "阳江", value: 57},
                    {name: "泸州", value: 57},
                    {name: "西宁", value: 57},
                    {name: "宜宾", value: 58},
                    {name: "呼和浩特", value: 58},
                    {name: "成都", value: 58},
                    {name: "大同", value: 58},
                    {name: "镇江", value: 59},
                    {name: "桂林", value: 59},
                    {name: "张家界", value: 59},
                    {name: "宜兴", value: 59},
                    {name: "北海", value: 60},
                    {name: "西安", value: 61},
                    {name: "金坛", value: 62},
                    {name: "东营", value: 62},
                    {name: "牡丹江", value: 63},
                    {name: "遵义", value: 63},
                    {name: "绍兴", value: 63},
                    {name: "扬州", value: 64},
                    {name: "常州", value: 64},
                    {name: "潍坊", value: 65},
                    {name: "重庆", value: 66},
                    {name: "台州", value: 67},
                    {name: "南京", value: 67},
                    {name: "滨州", value: 70},
                    {name: "贵阳", value: 71},
                    {name: "无锡", value: 71},
                    {name: "本溪", value: 71},
                    {name: "克拉玛依", value: 72},
                    {name: "渭南", value: 72},
                    {name: "马鞍山", value: 72},
                    {name: "宝鸡", value: 72},
                    {name: "焦作", value: 75},
                    {name: "句容", value: 75},
                    {name: "北京", value: 79},
                    {name: "徐州", value: 79},
                    {name: "衡水", value: 80},
                    {name: "包头", value: 80},
                    {name: "绵阳", value: 80},
                    {name: "乌鲁木齐", value: 84},
                    {name: "枣庄", value: 84},
                    {name: "杭州", value: 84},
                    {name: "淄博", value: 85},
                    {name: "鞍山", value: 86},
                    {name: "溧阳", value: 86},
                    {name: "库尔勒", value: 86},
                    {name: "安阳", value: 90},
                    {name: "开封", value: 90},
                    {name: "济南", value: 92},
                    {name: "德阳", value: 93},
                    {name: "温州", value: 95},
                    {name: "九江", value: 96},
                    {name: "邯郸", value: 98},
                    {name: "临安", value: 99},
                    {name: "兰州", value: 99},
                    {name: "沧州", value: 100},
                    {name: "临沂", value: 103},
                    {name: "南充", value: 104},
                    {name: "天津", value: 105},
                    {name: "富阳", value: 106},
                    {name: "泰安", value: 112},
                    {name: "诸暨", value: 112},
                    {name: "郑州", value: 113},
                    {name: "哈尔滨", value: 114},
                    {name: "聊城", value: 116},
                    {name: "芜湖", value: 117},
                    {name: "唐山", value: 119},
                    {name: "平顶山", value: 119},
                    {name: "邢台", value: 119},
                    {name: "德州", value: 120},
                    {name: "济宁", value: 120},
                    {name: "荆州", value: 127},
                    {name: "宜昌", value: 130},
                    {name: "义乌", value: 132},
                    {name: "丽水", value: 133},
                    {name: "洛阳", value: 134},
                    {name: "秦皇岛", value: 136},
                    {name: "株洲", value: 143},
                    {name: "石家庄", value: 147},
                    {name: "莱芜", value: 148},
                    {name: "常德", value: 152},
                    {name: "保定", value: 153},
                    {name: "湘潭", value: 154},
                    {name: "金华", value: 157},
                    {name: "岳阳", value: 169},
                    {name: "长沙", value: 175},
                    {name: "衢州", value: 177},
                    {name: "廊坊", value: 193},
                    {name: "菏泽", value: 194},
                    {name: "合肥", value: 229},
                    {name: "武汉", value: 273},
                    {name: "大庆", value: 279}
                ]),
                symbolSize: 12,
                label: {
                    normal: {
                        show: false
                    },
                    emphasis: {
                        show: false
                    }
                },
                itemStyle: {
                    emphasis: {
                        borderColor: '#fff',
                        borderWidth: 1
                    }
                }
            }
        ]
    }
    echart.setOption(option);
    echart.on('georoam', function (params) {
        console.log(params);
    });

    echart.hideLoading();
    //自动适应屏幕浏览器的大小 当浏览器大小改变时 报表画布也跟着改变
    window.onresize = function () {
        echart.resize();
    };
}


//仪表盘
function loadYbp(){
	var data1=[]
	var data2=[]
	var data3=[]
	var data4=[]
	var data5=[]
	var data6=[]
	var data7=[]
	
	$.ajax({
        type: "POST",
        dataType: "JSON",
        async:  false,
        url: cxt+"power/selectYbp",
        contentType: "application/json;charset=UTF-8",
        success: function(r){
            if(r!=null){
            	//数据转换
            	for(var i=0;i<r.length;i++){
            		data1.push(r[i].map.wholecountryval);//全国
            		
            		data2.push(r[i].map.centralchinaval);//华中
            		data3.push(r[i].map.northchinaval);//华北
            		
            		data4.push(r[i].map.northwestval);//西北
            		data5.push(r[i].map.northeastval);//东北
            		
            		data6.push(r[i].map.eastchinaval);//华东
            		data7.push(r[i].map.southwestval);//西南
            		
            		
            	}
            	
            	
            }
        },
        error: function(r){
        }
    })
    //全国电网安全状态
    loadYbpQgdwaqzt(data1);
    //华北电网安全状态
    loadYbpHbdwaqzt(data2,data3);
    //东北电网安全状态
    loadYbpDbdwaqzt(data4,data5);
    //华东电网安全状态
    loadYbpHddwaqzt(data6,data7);
}

//全国电网安全状态
function loadYbpQgdwaqzt(data1){
    var echart = echarts.init(document.getElementById("qgdwaqzt"));
    var len=data1.length;
	var index=parseInt(len*Math.random())
//    $.ajax({
//        type: "POST",
//        dataType: "JSON",
//        async:  false,
//        url: cxt+"power/selectZgdt",
//        contentType: "application/json;charset=UTF-8",
//        success: function(result){
//            if(result!=null){
//            	//数据转换
//            }
//        },
//        error: function(result){
//        }
//    })
    var option = {
        title:{
            text: '全国电网安全状态',
            top: '10%',
            textStyle:{
                color: '#45afdc',
                fontSize:15
            },
            x:'center'
        },
        tooltip: {
            formatter: "{a} <br/> {c}"
        },
        series: [
            {
                name: '全国电网安全状态',
                type: 'gauge',
                //data: [{value: '0.1'}],
                data: [{value: data1[index]}],
                radius: '90%',
                center: ['50%', '65%'],
                min: 0,
                max: 1,
                splitNumber: 5,
                axisLine: {            // 坐标轴线
                    lineStyle: {       // 属性lineStyle控制线条样式
                        width: 10,
                        color: [
                            [0.25, '#73f440'],
                            [0.5, '#f17c3a'],
                            [0.75, '#ed3833'],
                            [1, '#fcf14f']
                        ]
                    }
                },
                axisTick: {            // 坐标轴小标记
                    length: 13,        // 属性length控制线长
                    lineStyle: {       // 属性lineStyle控制线条样式
                        color: 'auto'
                    }
                },
                splitLine: {           // 分隔线
                    length: 18,        // 属性length控制线长
                    lineStyle: {       // 属性lineStyle（详见lineStyle）控制线条样式
                        color: 'auto'
                    }
                },
                axisLabel: {
                    color: '#666',
                },
                detail: {
                    formatter: function(param) {
                        var level = '';
                        if (param <= 0.2 && param>0) {
                            level = '正常状态'
                        } else if (param <= 0.4 && param>0.2) {
                            level = '警戒状态'
                        } else if (param <= 0.8 && param>0.4) {
                            level = '紧急状态'
                        } else if (param <= 1 && param>0.8) {
                            level = '恢复状态'
                        }
                        return level;
                    },
                    offsetCenter: [0, "60%"],
                    textStyle: {
                        fontSize: 13,
                        color: "#73f440"
                    }
                },
                title: {
                    fontSize: 12,
                    color: '#999',
                    offsetCenter: [0, '55%']
                },
                pointer: {
                    width: 3            // 指针大小
                }
            }
        ]
    };
    echart.setOption(option);
    echart.hideLoading();
    //自动适应屏幕浏览器的大小 当浏览器大小改变时 报表画布也跟着改变
    window.onresize = function () {
        echart.resize();
    };
}
//华北电网安全状态
function loadYbpHbdwaqzt(data2,data3){
	var len=data2.length;
	var index=parseInt(len*Math.random())
    var echart = echarts.init(document.getElementById("hbdwaqzt"));
    var option = {
        title:{
            text: '华北电网安全状态',
            top: '10%',
            textStyle:{
                color: '#45afdc',
                fontSize:15
            },
            x:'center'
        },
        tooltip: {
            formatter: "{a} <br/> {c}"
        },
        series: [
            {
                name: '华北电网安全状态',
                type: 'gauge',
                //data: [{value: '0.1'}],
                data: [{value: data2[index]}],
                radius: '90%',
                center: ['50%', '65%'],
                min: 0,
                max: 1,
                splitNumber: 5,
                axisLine: {            // 坐标轴线
                    lineStyle: {       // 属性lineStyle控制线条样式
                        width: 10,
                        color: [
                            [0.25, '#73f440'],
                            [0.5, '#f17c3a'],
                            [0.75, '#ed3833'],
                            [1, '#fcf14f']
                        ]
                    }
                },
                axisTick: {            // 坐标轴小标记
                    length: 13,        // 属性length控制线长
                    lineStyle: {       // 属性lineStyle控制线条样式
                        color: 'auto'
                    }
                },
                splitLine: {           // 分隔线
                    length: 18,        // 属性length控制线长
                    lineStyle: {       // 属性lineStyle（详见lineStyle）控制线条样式
                        color: 'auto'
                    }
                },
                axisLabel: {
                    color: '#666',
                },
                detail: {
                    formatter: function(param) {
                        var level = '';
                        if (param <= 0.2 && param>0) {
                            level = '正常状态'
                        } else if (param <= 0.4 && param>0.2) {
                            level = '警戒状态'
                        } else if (param <= 0.8 && param>0.4) {
                            level = '紧急状态'
                        } else if (param <= 1 && param>0.8) {
                            level = '恢复状态'
                        }
                        return level;
                    },
                    offsetCenter: [0, "60%"],
                    textStyle: {
                        fontSize: 13,
                        color: "#73f440"
                    }
                },
                title: {
                    fontSize: 12,
                    color: '#999',
                    offsetCenter: [0, '55%']
                },
                pointer: {
                    width: 3            // 指针大小
                }
            }
        ]
    };
    //var data = ['0.4','0.6','0.9','0.1'];
    var data = data3;
    var title = ['华中电网安全状态','华北电网安全状态'];
    var color = ['#73f440','#f17c3a','#ed3833','#fcf14f'];
    var d = 0;
    var t = 0;
    var c = 0;
    var timeTicket = setInterval(function() {
        if(d==4){
            d = 0;
        }
        if(t==2){
            t = 0;
        }
        if(data[d]=="0.1"){
            c = 0;
        }else if(data[d]=="0.4"){
            c = 1;
        }else if(data[d]=="0.6"){
            c = 2;
        }else if(data[d]=="0.9"){
            c = 3;
        }else{
            c = 0;
        }
        option.series[0].data[0].value = data[d];
        option.series[0].name = title[t];
        option.title.text = title[t];
        option.series[0].detail.textStyle.color = color[c];
        d++;
        t++;
        echart.setOption(option, true);
    }, 5000);
    echart.setOption(option);
    echart.hideLoading();
    //自动适应屏幕浏览器的大小 当浏览器大小改变时 报表画布也跟着改变
    window.onresize = function () {
        echart.resize();
    };
}
//东北电网安全状态
function loadYbpDbdwaqzt(data4,data5){
    var echart = echarts.init(document.getElementById("dbdwaqzt"));
    var len=data4.length;
	var index=parseInt(len*Math.random())
    var option = {
        title:{
            text: '东北电网安全状态',
            top: '10%',
            textStyle:{
                color: '#45afdc',
                fontSize:15
            },
            x:'center'
        },
        tooltip: {
            formatter: "{a} <br/> {c}"
        },
        series: [
            {
                name: '东北电网安全状态',
                type: 'gauge',
                //data: [{value: '0.1'}],
                data: [{value: data4[index]}],
                radius: '90%',
                center: ['50%', '65%'],
                min: 0,
                max: 1,
                splitNumber: 5,
                axisLine: {            // 坐标轴线
                    lineStyle: {       // 属性lineStyle控制线条样式
                        width: 10,
                        color: [
                            [0.25, '#73f440'],
                            [0.5, '#f17c3a'],
                            [0.75, '#ed3833'],
                            [1, '#fcf14f']
                        ]
                    }
                },
                axisTick: {            // 坐标轴小标记
                    length: 13,        // 属性length控制线长
                    lineStyle: {       // 属性lineStyle控制线条样式
                        color: 'auto'
                    }
                },
                splitLine: {           // 分隔线
                    length: 18,        // 属性length控制线长
                    lineStyle: {       // 属性lineStyle（详见lineStyle）控制线条样式
                        color: 'auto'
                    }
                },
                axisLabel: {
                    color: '#666',
                },
                detail: {
                    formatter: function(param) {
                        var level = '';
                        if (param <= 0.2 && param>0) {
                            level = '正常状态'
                        } else if (param <= 0.4 && param>0.2) {
                            level = '警戒状态'
                        } else if (param <= 0.8 && param>0.4) {
                            level = '紧急状态'
                        } else if (param <= 1 && param>0.8) {
                            level = '恢复状态'
                        }
                        return level;
                    },
                    offsetCenter: [0, "60%"],
                    textStyle: {
                        fontSize: 13,
                        color: "#73f440"
                    }
                },
                title: {
                    fontSize: 12,
                    color: '#999',
                    offsetCenter: [0, '55%']
                },
                pointer: {
                    width: 3            // 指针大小
                }
            }
        ]
    };
    //var data = ['0.4','0.6','0.9','0.1'];
    var data = data5;
    var title = ['西北电网安全状态','东北电网安全状态'];
    var color = ['#73f440','#f17c3a','#ed3833','#fcf14f'];
    var d = 0;
    var t = 0;
    var timeTicket = setInterval(function() {
        if(d==4){
            d = 0;
        }
        if(t==2){
            t = 0;
        }
        if(data[d]=="0.1"){
            c = 0;
        }else if(data[d]=="0.4"){
            c = 1;
        }else if(data[d]=="0.6"){
            c = 2;
        }else if(data[d]=="0.9"){
            c = 3;
        }else{
            c = 0;
        }
        option.series[0].data[0].value = data[d];
        option.series[0].name = title[t];
        option.title.text = title[t];
        option.series[0].detail.textStyle.color = color[c];
        d++;
        t++;
        echart.setOption(option, true);
    }, 5000);
    echart.setOption(option);
    echart.hideLoading();
    //自动适应屏幕浏览器的大小 当浏览器大小改变时 报表画布也跟着改变
    window.onresize = function () {
        echart.resize();
    };
}
//华东电网安全状态
function loadYbpHddwaqzt(data6,data7){
    var echart = echarts.init(document.getElementById("hddwaqzt"));
    var len=data6.length;
	var index=parseInt(len*Math.random())
    var option = {
        title:{
            text: '华东电网安全状态',
            top: '10%',
            textStyle:{
                color: '#45afdc',
                fontSize:15
            },
            x:'center'
        },
        tooltip: {
            formatter: "{a} <br/> {c}"
        },
        series: [
            {
                name: '华东电网安全状态',
                type: 'gauge',
                //data: [{value: '0.1'}],
                data: [{value: data6[index]}],
                radius: '90%',
                center: ['50%', '65%'],
                min: 0,
                max: 1,
                splitNumber: 5,
                axisLine: {            // 坐标轴线
                    lineStyle: {       // 属性lineStyle控制线条样式
                        width: 10,
                        color: [
                            [0.25, '#73f440'],
                            [0.5, '#f17c3a'],
                            [0.75, '#ed3833'],
                            [1, '#fcf14f']
                        ]
                    }
                },
                axisTick: {            // 坐标轴小标记
                    length: 13,        // 属性length控制线长
                    lineStyle: {       // 属性lineStyle控制线条样式
                        color: 'auto'
                    }
                },
                splitLine: {           // 分隔线
                    length: 18,        // 属性length控制线长
                    lineStyle: {       // 属性lineStyle（详见lineStyle）控制线条样式
                        color: 'auto'
                    }
                },
                axisLabel: {
                    color: '#666',
                },
                detail: {
                    formatter: function(param) {
                        var level = '';
                        if (param <= 0.2 && param>0) {
                            level = '正常状态'
                        } else if (param <= 0.4 && param>0.2) {
                            level = '警戒状态'
                        } else if (param <= 0.8 && param>0.4) {
                            level = '紧急状态'
                        } else if (param <= 1 && param>0.8) {
                            level = '恢复状态'
                        }
                        return level;
                    },
                    offsetCenter: [0, "60%"],
                    textStyle: {
                        fontSize: 13,
                        color: "#73f440"
                    }
                },
                title: {
                    fontSize: 12,
                    color: '#999',
                    offsetCenter: [0, '55%']
                },
                pointer: {
                    width: 3            // 指针大小
                }
            }
        ]
    };
    //var data = ['0.4','0.6','0.9','0.1'];
    var data = data7;
    var title = ['西南电网安全状态','华东电网安全状态'];
    var color = ['#73f440','#f17c3a','#ed3833','#fcf14f'];
    var d = 0;
    var t = 0;
    var timeTicket = setInterval(function() {
        if(d==4){
            d = 0;
        }
        if(t==2){
            t = 0;
        }
        if(data[d]=="0.1"){
            c = 0;
        }else if(data[d]=="0.4"){
            c = 1;
        }else if(data[d]=="0.6"){
            c = 2;
        }else if(data[d]=="0.9"){
            c = 3;
        }else{
            c = 0;
        }
        option.series[0].data[0].value = data[d];
        option.series[0].name = title[t];
        option.title.text = title[t];
        option.series[0].detail.textStyle.color = color[c];
        d++;
        t++;
        echart.setOption(option, true);
    }, 5000);
    echart.setOption(option);
    echart.hideLoading();
    //自动适应屏幕浏览器的大小 当浏览器大小改变时 报表画布也跟着改变
    window.onresize = function () {
        echart.resize();
    };
}




//中国地图
function loadZgdt(){
    var echart = echarts.init(document.getElementById("zgdt"));
    const geoCoordMap = {
        阿克苏地区: [80.260604, 41.168779],
        和田地区: [79.922211, 37.114157],
        上海: [121.480237, 31.236305],
        东莞: [113.758231, 23.026997],
        东营: [118.588614, 37.454925],
        中山: [113.399023, 22.522262],
        临汾: [111.526153, 36.094052],
        临沂: [118.36299, 35.110531],
        丹东: [124.362564, 40.00569],
        丽水: [119.929503, 28.472979],
        乌鲁木齐: [87.623314, 43.832806],
        佛山: [113.128432, 23.027707],
        保定: [115.471052, 38.880055],
        兰州: [103.840692, 36.067312],
        包头: [109.846755, 40.663636],
        北京: [116.413554, 39.911013],
        北海: [109.126614, 21.486955],
        南京: [118.802891, 32.064735],
        南宁: [108.373351, 22.823037],
        南昌: [115.864528, 28.687675],
        南通: [120.900301, 31.985237],
        厦门: [118.095915, 24.485821],
        台州: [121.426996, 28.662297],
        合肥: [117.235447, 31.82687],
        呼和浩特: [111.758518, 40.847461],
        咸阳: [108.715712, 34.335599],
        哈尔滨: [126.542417, 45.807782],
        唐山: [118.187036, 39.636673],
        嘉兴: [120.762045, 30.750912],
        大同: [113.306446, 40.082539],
        大连: [121.621391, 38.919345],
        天津: [117.205914, 39.090908],
        太原: [112.55706, 37.876885],
        威海: [122.128245, 37.519322],
        宁波: [121.556686, 29.880177],
        宝鸡: [107.243899, 34.367747],
        宿迁: [118.282062, 33.967686],
        常州: [119.980142, 31.816791],
        广州: [113.270793, 23.135308],
        廊坊: [116.69034, 39.54352],
        延安: [109.496361, 36.591003],
        张家口: [114.894165, 40.830172],
        徐州: [117.29235, 34.210143],
        德州: [116.365825, 37.441313],
        惠州: [114.423348, 23.116409],
        成都: [104.071216, 30.576279],
        扬州: [119.419107, 32.39986],
        承德: [117.969798, 40.957855],
        拉萨: [91.121025, 29.650088],
        无锡: [120.318954, 31.496704],
        日照: [119.533606, 35.422798],
        昆明: [102.839667, 24.885953],
        杭州: [120.161693, 30.280059],
        枣庄: [117.328513, 34.816569],
        柳州: [109.42198, 24.331519],
        株洲: [113.140431, 27.833737],
        武汉: [114.311831, 30.598428],
        汕头: [116.688739, 23.359289],
        江门: [113.088165, 22.584459],
        沈阳: [123.438973, 41.811339],
        沧州: [116.845272, 38.31022],
        河源: [114.707097, 23.749829],
        泉州: [118.682316, 24.880242],
        泰安: [117.094893, 36.205905],
        泰州: [119.932115, 32.4612],
        济南: [117.001319, 36.671627],
        济宁: [116.593852, 35.420269],
        海口: [110.206424, 20.050057],
        淄博: [118.061254, 36.819182],
        淮安: [119.022429, 33.616272],
        深圳: [114.066112, 22.548515],
        清远: [113.062619, 23.688238],
        温州: [120.705869, 28.001095],
        渭南: [109.516739, 34.505687],
        湖州: [120.094566, 30.899015],
        湘潭: [112.950575, 27.83585],
        滨州: [117.9792, 37.388387],
        潍坊: [119.168138, 36.713212],
        烟台: [121.454425, 37.469868],
        玉溪: [102.5537, 24.357512],
        珠海: [113.583235, 22.276392],
        盐城: [120.168187, 33.355301],
        盘锦: [122.077269, 41.125939],
        石家庄: [114.520828, 38.048684],
        福州: [119.302938, 26.080447],
        秦皇岛: [119.606184, 39.941259],
        绍兴: [120.586673, 30.036519],
        聊城: [115.992077, 36.462681],
        肇庆: [112.47177, 23.052984],
        舟山: [122.214339, 29.991092],
        苏州: [120.589613, 31.304566],
        莱芜: [117.683221, 36.219357],
        菏泽: [115.487696, 35.239435],
        营口: [122.241475, 40.672565],
        葫芦岛: [120.843388, 40.717364],
        衡水: [115.676942, 37.745166],
        衢州: [118.880768, 28.941661],
        西宁: [101.784269, 36.623477],
        西安: [108.946306, 34.347436],
        贵阳: [106.636816, 26.652747],
        连云港: [119.229571, 34.602342],
        邢台: [114.510889, 37.076646],
        邯郸: [114.545808, 36.631222],
        郑州: [113.631349, 34.753488],
        鄂尔多斯: [109.787314, 39.61463],
        重庆: [106.557165, 29.570997],
        金华: [119.654027, 29.084455],
        铜川: [108.951558, 34.902957],
        银川: [106.238976, 38.492392],
        镇江: [119.431494, 32.195688],
        长春: [125.33017, 43.82178],
        长沙: [112.945333, 28.233971],
        长治: [113.123046, 36.201585],
        阳泉: [113.587087, 37.86234],
        青岛: [120.389445, 36.072358],
        韶关: [113.603757, 24.816174],
        九江: [116.007993, 29.711328],
        大庆: [125.109727, 46.593216],
        宁德: [119.554701, 26.671748],
        忻州: [112.740804, 38.422382],
        石嘴山: [106.39078, 38.989783],
        池州: [117.497839, 30.67098],
        淮南: [117.006189, 32.631837],
        吐鲁番地区: [89.196029, 42.957303],
        宜昌: [111.292971, 30.697602],
        景德镇: [117.184967, 29.274337],
        安庆: [117.070127, 30.548594],
        怒江傈僳族自治州: [98.863189, 25.823736],
        白城: [122.845302, 45.6254],
        萍乡: [113.86077, 27.62897],
        抚州: [116.364627, 27.953603],
        朝阳: [120.457301, 41.579487],
        海东: [102.003965, 36.406412],
        湘西土家族苗族自治州: [109.745507, 28.317399],
        鹰潭: [117.075765, 28.265879],
        阿拉善盟: [105.735357, 38.857806],
        大阪府: [0, 0],
        鹤岗: [130.304284, 47.356043],
        吴忠: [106.205161, 38.003863],
        石河子: [86.085507, 44.312423],
        开封: [114.313904, 34.802941],
        延边朝鲜族自治州: [129.515602, 42.897211],
        白银: [104.144182, 36.550821],
        吕梁: [111.148086, 37.525476],
        随州: [113.389071, 31.696341],
        雅安: [103.04636, 30.021277],
        平顶山: [113.198935, 33.772051],
        阜新: [121.676518, 42.027983],
        普洱: [100.98114, 22.788486],
        三亚: [109.518646, 18.258217],
        赣州: [114.94126, 25.837179],
        广元: [105.849993, 32.441808],
        锦州: [121.133631, 41.100869],
        南充: [106.117231, 30.843297],
        衡阳: [112.578397, 26.899517],
        齐齐哈尔: [123.924531, 47.360087],
        兴安盟: [122.044544, 46.088444],
        乌海: [106.80185, 39.660154],
        楚雄彝族自治州: [101.534082, 25.051226],
        伊春: [128.84704, 47.733329],
        陇南: [104.928233, 33.406825],
        荆门: [112.205843, 31.041792],
        辽源: [125.150107, 42.8943],
        怀化: [110.008116, 27.575595],
        牡丹江: [129.638976, 44.558647],
        黄南藏族自治州: [102.021495, 35.526125],
        湛江: [110.365494, 21.277163],
        天水: [105.731276, 34.587162],
        黔东南苗族侗族自治州: [107.990602, 26.589858],
        云浮: [112.051045, 22.921154],
        安康: [109.03592, 32.690575],
        日喀则地区: [88.956063, 29.26816],
        海北藏族自治州: [100.907395, 36.960702],
        海西蒙古族藏族自治州: [97.377823, 37.382839],
        吉安: [115.00027, 27.119751],
        黄石: [115.045433, 30.205336],
        宿州: [116.970454, 33.652034],
        茂名: [110.931773, 21.669051],
        阳江: [111.989051, 21.864421],
        信阳: [114.099264, 32.153186],
        三门峡: [111.206832, 34.778442],
        咸宁: [114.328967, 29.847123],
        许昌: [113.858804, 34.041737],
        保山: [99.168373, 25.117882],
        鹤壁: [114.304044, 35.752656],
        运城: [111.013379, 35.032587],
        达州: [107.474504, 31.214347],
        常德: [111.704994, 29.037723],
        酒泉: [98.500427, 39.738615],
        马鞍山: [118.512691, 31.67633],
        南阳: [112.535009, 32.996701],
        邵阳: [111.474133, 27.245167],
        黔南布依族苗族自治州: [107.528663, 26.260586],
        孝感: [113.922962, 30.930712],
        安顺: [105.952622, 26.259904],
        辽阳: [123.243726, 41.274452],
        黔西南布依族苗族自治州: [104.910858, 25.095974],
        克拉玛依: [84.89587, 45.585765],
        庆阳: [107.649305, 35.716096],
        呼伦贝尔: [119.77221, 49.217977],
        六盘水: [104.836786, 26.599086],
        新余: [114.923664, 27.823541],
        七台河: [131.009618, 45.776512],
        商丘: [115.662798, 34.420378],
        漯河: [114.02323, 33.587703],
        乌兰察布: [113.140223, 40.999972],
        潜江: [112.905773, 30.407633],
        定西: [104.631662, 35.587354],
        鸡西: [130.976161, 45.300906],
        汕尾: [115.381693, 22.791322],
        四平: [124.356844, 43.172447],
        西双版纳傣族自治州: [100.803836, 22.013792],
        遂宁: [105.599152, 30.539156],
        商洛: [109.94688, 33.876525],
        海南藏族自治州: [100.626831, 36.292132],
        文山壮族苗族自治州: [104.221606, 23.404187],
        六安: [116.529651, 31.741226],
        张家界: [110.484925, 29.122477],
        潮州: [116.62943, 23.662923],
        蚌埠: [117.395835, 32.921498],
        桂林: [110.296442, 25.279893],
        甘南藏族自治州: [102.917605, 34.98901],
        驻马店: [114.029465, 33.017546],
        林芝地区: [94.368109, 29.654792],
        百色: [106.624969, 23.907845],
        鞍山: [123.000974, 41.114122],
        郴州: [113.021311, 25.776711],
        巴中: [106.753912, 31.872851],
        恩施土家族苗族自治州: [109.494763, 30.277908],
        十堰: [110.80454, 32.635042],
        临沧: [100.10566, 23.914336],
        泸州: [105.449092, 28.877577],
        平凉: [106.671741, 35.549266],
        宣城: [118.765196, 30.946576],
        绵阳: [104.686164, 31.473364],
        佳木斯: [130.32696, 46.806581],
        遵义: [106.933658, 27.731749],
        钦州: [108.66089, 21.985392],
        玉树藏族自治州: [97.01308, 33.011061],
        本溪: [123.773468, 41.299847],
        朔州: [112.438184, 39.33789],
        毕节: [105.333323, 27.408562],
        张掖: [100.456221, 38.932187],
        南平: [118.1843, 26.647662],
        濮阳: [115.035917, 35.767586],
        宜宾: [104.648103, 28.75761],
        铜仁: [109.168558, 27.674903],
        松原: [124.831633, 45.147201],
        漳州: [117.653827, 24.519197],
        梧州: [111.285647, 23.482873],
        洛阳: [112.460033, 34.624376],
        龙岩: [117.023668, 25.081257],
        莆田: [119.014232, 25.45996],
        济源: [112.609314, 35.072867],
        哈密地区: [93.522785, 42.824642],
        昭通: [103.723311, 27.344057],
        大理白族自治州: [100.274223, 25.612206],
        昌吉回族自治州: [87.314822, 44.016923],
        迪庆藏族自治州: [99.70948, 27.825264],
        黑河: [127.535014, 50.251193],
        吉林: [126.556073, 43.843512],
        广安: [106.639772, 30.461708],
        黄山: [118.174807, 30.133213],
        德阳: [104.404319, 31.133105],
        河池: [108.091898, 24.698828],
        益阳: [112.361677, 28.559818],
        通化: [125.946506, 41.733906],
        永州: [111.618703, 26.426612],
        周口: [114.703433, 33.631958],
        梅州: [116.129179, 24.294311],
        锡林郭勒盟: [116.054141, 43.939525],
        固原: [106.24917, 36.021609],
        滁州: [118.323252, 32.308165],
        荆州: [112.24722, 30.340606],
        芜湖: [118.439561, 31.358798],
        襄阳: [112.250093, 32.229169],
        吉隆坡: [0, 0],
        榆林: [109.741195, 38.290886],
        果洛藏族自治州: [100.251341, 34.477207],
        玉林: [110.18743, 22.660656],
        临夏回族自治州: [103.217303, 35.607475],
        鄂州: [114.901557, 30.396522],
        晋中: [112.759375, 37.692757],
        巴音郭楞蒙古自治州: [86.151584, 41.770226],
        澳门: [113.549403, 22.192961],
        内江: [105.065028, 29.585836],
        揭阳: [116.37922, 23.555773],
        通辽: [122.251207, 43.658363],
        阜阳: [115.821389, 32.895879],
        中卫: [105.203332, 37.506058],
        铜陵: [117.818795, 30.950899],
        红河哈尼族彝族自治州: [103.38215, 23.369914],
        曲靖: [103.802685, 25.496328],
        香港: [114.171994, 22.281089],
        汉中: [107.030197, 33.07382],
        乐山: [103.77193, 29.558141],
        新乡: [113.933349, 35.308973],
        晋城: [112.857706, 35.496081],
        巴彦淖尔: [107.394129, 40.749427],
        武威: [102.644524, 37.934078],
        岳阳: [113.135679, 29.363262],
        赤峰: [118.895463, 42.264586],
        白山: [126.431052, 41.94643],
        攀枝花: [101.725262, 26.588109],
        黄冈: [114.878872, 30.459422],
        绥化: [126.975678, 46.658789],
        双鸭山: [131.165442, 46.652966],
        凉山彝族自治州: [102.273965, 27.887685],
        伊犁哈萨克自治州: [81.330697, 43.922815],
        德宏傣族景颇族自治州: [98.591419, 24.438031],
        安阳: [114.3996, 36.103649],
        三明: [117.645742, 26.269683],
        宜春: [114.422683, 27.820089],
        上饶: [117.950028, 28.460864],
        自贡: [104.784891, 29.345379],
        娄底: [112.001082, 27.703196],
        丽江: [100.23357, 26.862521],
        防城港: [108.361138, 21.693439],
        淮北: [116.804878, 33.96064],
        儋州: [109.587145, 19.527081],
        怒江州: [98.863189, 25.823736],
        焦作: [113.248557, 35.221493],
        铁岭: [123.848797, 42.292573],
        抚顺: [123.963595, 41.886078],
        巢湖: [117.88049, 31.608733],
        西双版纳: [100.803836, 22.013792],
        德宏州: [98.591419, 24.438031],
        恩施: [109.485727, 30.30089],
        湘西州: [109.745507, 28.317399],
        西昌: [102.269526, 27.900601],
        阿坝州: [102.231186, 31.905609],
        黔南州: [107.528663, 26.260586],
        黔东南州: [107.990602, 26.589858],
        黔西南州: [104.910858, 25.095974],
        大理州: [100.274223, 25.612206],
        红河州: [103.38215, 23.369914],
        文山州: [104.221606, 23.404187],
        楚雄州: [101.534082, 25.051226],
        迪庆州: [99.70948, 27.825264],
        山南地区: [91.779601, 29.24309],
        那曲地区: [92.0578, 31.482375],
        博尔塔拉蒙古自治州: [82.073064, 44.912168],
        临夏州: [103.217303, 35.607475],
        甘南州: [102.917605, 34.98901],
        格尔木: [94.909745, 36.408588],
        奎屯: [84.90832, 44.432645],
        亳州: [115.7786, 33.8445],
        崇左: [107.3647, 22.3765],
        定安县: [110.3588, 19.6814],
        东方: [108.6518, 19.0953],
        贵港: [109.5989, 23.1115],
        贺州: [111.5666, 24.4035],
        嘉峪关: [98.2891, 39.7731],
        金昌: [102.1880, 38.5200],
        来宾: [109.2214, 23.7503],
        乐东黎族自治县: [109.1730, 18.7502],
        陵水黎族自治县: [110.0375, 18.5060],
        眉山: [103.8485, 30.0754],
        琼海: [110.4921, 19.2396],
        台湾: [120.9605, 23.6978],
        天门: [113.3169, 30.8657],
        屯昌县: [110.1034, 19.3517],
        万宁: [110.3816, 18.8078],
        文昌: [113.8259, 25.8228],
        五指山: [109.5169, 18.7751],
        仙桃: [113.4234, 30.3608],
        资阳: [104.6520, 30.1246],
        安徽: [117.17, 31.52],
        福建: [119.18, 26.05],
        甘肃: [103.51, 36.04],
        广东: [113.14, 23.08],
        广西: [108.19, 22.48],
        贵州: [106.42, 26.35],
        海南: [110.20, 20.02],
        河北: [114.30, 38.02],
        河南: [113.40, 34.46],
        黑龙江: [126.36, 45.44],
        湖北: [114.17, 30.35],
        湖南: [112.59, 28.12],
        江苏: [118.46, 32.03],
        江西: [115.55, 28.40],
        辽宁: [123.25, 41.48],
        内蒙古: [111.41, 40.48],
        宁夏: [106.16, 38.27],
        青海: [101.48, 36.38],
        山东: [117.00, 36.40],
        山西: [112.33, 37.54],
        陕西: [108.57, 34.17],
        四川: [104.04, 30.40],
        西藏: [91.08, 29.39],
        新疆: [87.36, 43.45],
        云南: [102.42, 25.04],
        浙江: [120.10, 30.16],
        getCoord(key) {
            const o = Object.keys(this).find(item => key.indexOf(item) >= 0);
            if (o) {
                return this[o];
            }
            return [];
        },
    };


    const datas = [[{"name":"上海市"},{"name":"上海市","value":322}],[{"name":"上海市"},{"name":"北京市","value":84}],[{"name":"上海市"},{"name":"安徽省","value":28}],[{"name":"上海市"},{"name":"山西省","value":28}],[{"name":"上海市"},{"name":"广东省","value":350}],[{"name":"上海市"},{"name":"广西壮族自治区","value":42}],[{"name":"上海市"},{"name":"江苏省","value":84}],[{"name":"上海市"},{"name":"河南省","value":14}],[{"name":"上海市"},{"name":"浙江省","value":14}],[{"name":"北京市"},{"name":"上海市","value":210}],[{"name":"北京市"},{"name":"云南省","value":84}],[{"name":"北京市"},{"name":"内蒙古自治区","value":350}],[{"name":"北京市"},{"name":"北京市","value":11284}],[{"name":"北京市"},{"name":"吉林省","value":3878}],[{"name":"北京市"},{"name":"四川省","value":224}],[{"name":"北京市"},{"name":"天津市","value":366}],[{"name":"北京市"},{"name":"安徽省","value":252}],[{"name":"北京市"},{"name":"山东省","value":18802}],[{"name":"北京市"},{"name":"山西省","value":454}],[{"name":"北京市"},{"name":"广东省","value":910}],[{"name":"北京市"},{"name":"广西壮族自治区","value":98}],[{"name":"北京市"},{"name":"新疆维吾尔自治区","value":140}],[{"name":"北京市"},{"name":"江苏省","value":462}],[{"name":"北京市"},{"name":"江西省","value":294}],[{"name":"北京市"},{"name":"河北省","value":1092}],[{"name":"北京市"},{"name":"河南省","value":14350}],[{"name":"北京市"},{"name":"浙江省","value":392}],[{"name":"北京市"},{"name":"海南省","value":56}],[{"name":"北京市"},{"name":"湖北省","value":140}],[{"name":"北京市"},{"name":"湖南省","value":98}],[{"name":"北京市"},{"name":"甘肃省","value":2422}],[{"name":"北京市"},{"name":"福建省","value":56}],[{"name":"北京市"},{"name":"贵州省","value":26}],[{"name":"北京市"},{"name":"辽宁省","value":7448}],[{"name":"北京市"},{"name":"重庆市","value":42}],[{"name":"北京市"},{"name":"陕西省","value":162}],[{"name":"北京市"},{"name":"黑龙江省","value":570}],[{"name":"四川省"},{"name":"上海市","value":14}],[{"name":"四川省"},{"name":"北京市","value":196}],[{"name":"四川省"},{"name":"四川省","value":266}],[{"name":"四川省"},{"name":"广东省","value":48}],[{"name":"四川省"},{"name":"重庆市","value":28}],[{"name":"四川省"},{"name":"陕西省","value":14}],[{"name":"天津市"},{"name":"北京市","value":98}],[{"name":"天津市"},{"name":"天津市","value":70}],[{"name":"天津市"},{"name":"广东省","value":126}],[{"name":"广东省"},{"name":"上海市","value":104}],[{"name":"广东省"},{"name":"云南省","value":7532}],[{"name":"广东省"},{"name":"内蒙古自治区","value":602}],[{"name":"广东省"},{"name":"北京市","value":2380}],[{"name":"广东省"},{"name":"吉林省","value":560}],[{"name":"广东省"},{"name":"四川省","value":282}],[{"name":"广东省"},{"name":"天津市","value":130}],[{"name":"广东省"},{"name":"安徽省","value":13496}],[{"name":"广东省"},{"name":"山东省","value":4340}],[{"name":"广东省"},{"name":"山西省","value":240}],[{"name":"广东省"},{"name":"广东省","value":60028}],[{"name":"广东省"},{"name":"广西壮族自治区","value":1696}],[{"name":"广东省"},{"name":"新疆维吾尔自治区","value":240}],[{"name":"广东省"},{"name":"江苏省","value":13608}],[{"name":"广东省"},{"name":"江西省","value":15414}],[{"name":"广东省"},{"name":"河北省","value":366}],[{"name":"广东省"},{"name":"河南省","value":7756}],[{"name":"广东省"},{"name":"浙江省","value":19082}],[{"name":"广东省"},{"name":"海南省","value":3136}],[{"name":"广东省"},{"name":"湖北省","value":15190}],[{"name":"广东省"},{"name":"湖南省","value":14588}],[{"name":"广东省"},{"name":"甘肃省","value":1288}],[{"name":"广东省"},{"name":"福建省","value":17836}],[{"name":"广东省"},{"name":"贵州省","value":6216}],[{"name":"广东省"},{"name":"辽宁省","value":1694}],[{"name":"广东省"},{"name":"重庆市","value":6958}],[{"name":"广东省"},{"name":"陕西省","value":7840}],[{"name":"广东省"},{"name":"黑龙江省","value":1568}],[{"name":"浙江省"},{"name":"北京市","value":126}],[{"name":"浙江省"},{"name":"安徽省","value":14}],[{"name":"浙江省"},{"name":"广东省","value":560}],[{"name":"浙江省"},{"name":"江苏省","value":322}],[{"name":"浙江省"},{"name":"浙江省","value":966}],[{"name":"浙江省"},{"name":"陕西省","value":14}],[{"name":"重庆市"},{"name":"北京市","value":42}],[{"name":"重庆市"},{"name":"广东省","value":210}],[{"name":"重庆市"},{"name":"重庆市","value":532}],[{"name":"重庆市"},{"name":"陕西省","value":14}]];
    const convertData = (data) => {
        const res = [];
        for (let i = 0; i < data.length; i += 1) {
            const dataItem = data[i];
            const fromCoord = geoCoordMap.getCoord(dataItem[0].name);
            const toCoord = geoCoordMap.getCoord(dataItem[1].name);
            if (fromCoord && toCoord) {
                res.push({
                    fromName: dataItem[0].name,
                    toName: dataItem[1].name,
                    coords: [fromCoord, toCoord],
                    value: dataItem[1].value,
                });
            }
        }
        return res;
    };
    // 去重 合并
    const labels = datas.length > 0 ? datas.reduce((a, b) => {
        b[1].from = b[0].name;
        if (a === 0) {
            return [...b];
        }
        return [...a, ...b];
    }, 0).reduce((a, b) => {
        const index = a.findIndex(item => item.name === b.name);
        if (index >= 0) {
            if (b.value) {
                if (!a[index].values) {
                    a[index].values = [];
                }
                const v = (!a[index].value ? 0 : a[index].value);
                a[index].value = v + b.value;
                a[index].values.push(b);
            }
            return a;
        } else if (b.value) {
            b.values = [];
            b.values.push(JSON.parse(JSON.stringify(b)));
        }
        a.push(b);
        return a;
    }, []) : [];


    var option ={
        legend: {
            show: false,
            orient: 'vertical',
            top: 'bottom',
            left: 'right',
            data: ['地点', '线路'],
            textStyle: {
                color: '#fff',
            },
        },
        tooltip: {
            trigger: 'item',
            formatter(params) {
                if (params.data.values) {
                    return `${params.marker}总数:${params.value[2]}<br/>${params.data.values.map(item => `${item.from}->${params.name}:${item.value}`).join('<br />')}`;
                }

                return '';
            },
        },
        geo: {
            top: '15%',
            map: 'china',
            zoom: 1.1,
            label: {
                emphasis: {
                    show: false,
                },
            },
            roam: true,
            itemStyle: {
                normal: {
                    areaColor: '#123f66',
                    borderColor: '#cddf6b',
                    opacity:0.5 //图形透明度
                },
                emphasis: {
                    areaColor: '#1a3a42',
                },
            },
        },
        series: [{
            name: '地点',
            type: 'effectScatter',
            coordinateSystem: 'geo',
            zlevel: 2,
            rippleEffect: {
                brushType: 'stroke',
            },
            // label: {
            //     normal: {
            //         show: true,
            //         position: 'right',
            //         formatter: '{b}',
            //     },
            // },
            symbolSize: 10,
            showEffectOn: 'render',
            itemStyle: {
                normal: {
                    color: '#46bee9',
                },
            },
            data: labels.map((dataItem) => {
                return {
                    name: dataItem.name,
                    value: geoCoordMap.getCoord(dataItem.name).concat([dataItem.value]),
                    values: dataItem.values,
                    itemStyle: {
                        normal: {
                            color: !dataItem.value ? '#DEB887' : '#EEE8AA',
                        },
                    },
                };
            }),
        }, {
            name: '线路',
            type: 'lines',
            coordinateSystem: 'geo',
            zlevel: 2,
            large: true,
            effect: {
                show: true,
                constantSpeed: 30,
                symbol: 'pin',
                symbolSize: 5,
                trailLength: 0,
                color:'#EEE8AA'
            },
            lineStyle: {
                normal: {
                    color: (params) => {
                        // 计算渐变线方向，出货地颜色为a,入货颜色为b
                        const b1 = params.data.coords[0][0] - params.data.coords[1][0] > 0;
                        const b2 = params.data.coords[0][1] - params.data.coords[1][1] > 0;
                        const x1 = b1 ? 1 : 0;
                        const y1 = b2 ? 0 : 1;
                        const x2 = b1 ? 0 : 1;
                        const y2 = b2 ? 1 : 0;
                        return {
                            type: 'linear',
                            x: x1,
                            y: y1,
                            x2: x2,
                            y2: y2,
                            colorStops: [{
                                offset: 0, color: '#a1a2AA' // 0% 处的颜色
                            }, {
                                offset: 1, color: '#3babae' // 100% 处的颜色
                            }],
                            globalCoord: false // 缺省为 false
                        };
                    },
                    width: 1,
                    opacity: 0.4,
                    curveness: 0.1,
                },
            },
            data: convertData(datas),
        }],
    };
    echart.setOption(option);
    echart.hideLoading();
    //自动适应屏幕浏览器的大小 当浏览器大小改变时 报表画布也跟着改变
    window.onresize = function () {
        echart.resize();
    };
}

//关键节点稳定指标
function loadGjjdwdzb(){
    var echart = echarts.init(document.getElementById("gjjdwdzb"));
//    var xData = ['西安','云南','西宁','长沙','南宁','济南'];
//    var yData = [0.90,0.95,0.85,0.5,0.92,0.98];
    var xData = [];
    var yData = [];
    $.ajax({
        type: "POST",
        dataType: "JSON",
        async:  false,
        url: cxt+"power/selectloadGjjdwdzb",
        contentType: "application/json;charset=UTF-8",
        success: function(r){
            if(r!=null){
            	for(var i=0;i<r.length;i++){
            		xData.push(r[i].map.city); //电力公司名称
            		yData.push(r[i].map.indexval); //分布值
            	}
            	console.log(r)
            	//数据转换
            }
        },
        error: function(r){
        }
    })
    var option = {
        color: ['#3398DB'],
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'line',
                lineStyle: {
                    opacity: 0
                }
            },
            formatter: function(prams) {
                return "指标：" + prams[0].data
            }
        },
        grid: {
            left: '3%',
            right: '3%',
            bottom: '0%',
            top: '10%',
            height: '85%',
            containLabel: true,
            z: 22
        },
        xAxis: [{
            type: 'category',
            gridIndex: 0,
            data: xData,
            axisLine: {
                show: false
            },
            axisTick: false,
            splitLine: {
                show: false,
            },
            axisLabel: {
                color: "#FFFFFF",
            }
        }],
        yAxis: [{
            type: 'value',
            gridIndex: 0,
            axisLine: {
                show: false
            },
            axisTick: false,
            splitLine: {
                show: false,
            },
            axisLabel: {
                color: "#FFFFFF",
            }
        },{
            type: 'value',
            gridIndex: 0,
            splitNumber: 12,
            axisLine: {
                show: false
            },
            axisTick: false,
            splitLine: {
                show: false,
            },
            axisLabel: {
                color: "#FFFFFF",
            }
        }
        ],
        series: [{
            name: '指标',
            type: 'bar',
            barWidth: '30%',
            xAxisIndex: 0,
            yAxisIndex: 0,
            itemStyle: {
                normal: {
                    color: new echarts.graphic.LinearGradient(
                        0, 0, 0, 1, [{
                            offset: 0,
                            color: '#4BB8D7'
                        },
                            {
                                offset: 0.5,
                                color: '#4BB8D7'
                            },
                            {
                                offset: 1,
                                color: '#051D32'
                            }
                        ]
                    )
                }
            },
            data: yData,
            zlevel: 11
        }
        ]
    };
    echart.setOption(option);
    echart.hideLoading();
    //自动适应屏幕浏览器的大小 当浏览器大小改变时 报表画布也跟着改变
    window.onresize = function () {
        echart.resize();
    };
}

//策略表
function loadClb(){
	var clbAarray = null;
	$.ajax({
        type: "POST",
        dataType: "JSON",
        async:  false,
        url: cxt+"power/selectClb",
        contentType: "application/json;charset=UTF-8",
        success: function(r){
            if(r!=null){
            	clbAarray = r;
            }
        },
        error: function(r){
        }
    })
//	var clbAarray = [
//		{'jdh':'临汾','wdd':'0.66','cfhl':'0','wgbcl':'0'},
//		{'jdh':'西安','wdd':'0.90','cfhl':'0','wgbcl':'0'},
//		{'jdh':'玉树','wdd':'0.07','cfhl':'0','wgbcl':'0'},
//		{'jdh':'西宁','wdd':'0.02','cfhl':'0','wgbcl':'0'},
//		{'jdh':'长沙','wdd':'0.452','cfhl':'4.04j+j41.41','wgbcl':'64.39'}
//	];
	var str = "";
	str+="<table class=\"main-btn-right-modular-table\">";
	str+="<tr class=\"main-btn-right-modular-table-tr-title\">";
	str+="<td class=\"main-btn-right-modular-table-td\">节点号</td>";
	str+="<td class=\"main-btn-right-modular-table-td\">稳定度</td>";
	str+="<td class=\"main-btn-right-modular-table-td\">超负荷量</td>";
	str+="<td class=\"main-btn-right-modular-table-td\">无功补偿量</td>";
	str+="</tr>";
	for(var i=0;i<clbAarray.length-1;i++){
		str+="<tr class=\"main-btn-right-modular-table-tr\">";
		str+="<td class=\"main-btn-right-modular-table-td\">"+clbAarray[i].map.nodenumber+"</td>";
		str+="<td class=\"main-btn-right-modular-table-td\">"+clbAarray[i].map.stability+"</td>";
		str+="<td class=\"main-btn-right-modular-table-td\">"+clbAarray[i].map.overloadcapacity+"</td>";
		str+="<td class=\"main-btn-right-modular-table-td\">"+clbAarray[i].map.rpowercompensation+"</td>";
		str+="</tr>";
	}
	str+="</table>";
	$('#clb').html(str);
}

//敲准淮南等值参数
function loadQhndzcs(){
	var qhndzcsAarray = null;
	$.ajax({
        type: "POST",
        dataType: "JSON",
        async:  false,
        url: cxt+"power/selectloadQhndzcs",
        contentType: "application/json;charset=UTF-8",
        success: function(r){
            if(r!=null){
            	qhndzcsAarray = r;
            }
        },
        error: function(r){
        }
    })
//	var qhndzcsAarray = [
//		{'jdh':'宁夏','dzds':'0.552+j0.273','dzzk':'0.001+j0.011','fhzk':'0.302+j0.002'},
//		{'jdh':'太原','dzds':'0.056+j0.213','dzzk':'0.001+j0.011','fhzk':'0.132+0.002'},
//		{'jdh':'临汾','dzds':'0.054+j0.161','dzzk':'0.002+j0.013','fhzk':'0.343+j0.123'},
//		{'jdh':'西安','dzds':'0.051+j0.109','dzzk':'0.002+j0.013','fhzk':'0.101+j1.546'},
//		{'jdh':'兰州','dzds':'0.014+j0.102','dzzk':'0.002+j0.013','fhzk':'0.242+j0.116'},
//		{'jdh':'玉树','dzds':'0.069+j0.163','dzzk':'0.001+j0.014','fhzk':'0.293+j0.029'}
//	];
	var str = "";
	str+="<table class=\"main-btn-right-modular-btn-table\">";
	str+="<tr class=\"main-btn-right-modular-btn-table-tr-title\">";
	str+="<td class=\"main-btn-right-modular-btn-table-td\">节点号</td>";
	str+="<td class=\"main-btn-right-modular-btn-table-td\">等值电势</td>";
	str+="<td class=\"main-btn-right-modular-btn-table-td\">等值阻抗</td>";
	str+="<td class=\"main-btn-right-modular-btn-table-td\">负荷阻抗</td>";
	str+="</tr>";
	for(var i=0;i<qhndzcsAarray.length;i++){
		str+="<tr class=\"main-btn-right-modular-btn-table-tr\">";
		str+="<td class=\"main-btn-right-modular-btn-table-td\">"+qhndzcsAarray[i].map.nodenumber+"</td>";
		str+="<td class=\"main-btn-right-modular-btn-table-td\">"+qhndzcsAarray[i].map.equivalentpotential+"</td>";
		str+="<td class=\"main-btn-right-modular-btn-table-td\">"+qhndzcsAarray[i].map.equivalentimpedance+"</td>";
		str+="<td class=\"main-btn-right-modular-btn-table-td\">"+qhndzcsAarray[i].map.loadimpedance+"</td>";
		str+="</tr>";
	}
	str+="</table>";
	$('#qhndzcs').html(str);
}

//定时器执行方法
function refresh(){
//	loadEchart();
//	window.location.reload();//页面刷新
}

//默认定时器
var interval = setInterval(refresh,timenum);
